﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Abp.Domain.Entities;
using Toolbelt.ComponentModel.DataAnnotations.Schema;

namespace HCD.Entities
{
    [Table("HIS_EXAM")]
    public class HisExam : Entity<long>
    {
        /// <summary>
        /// 病人标识号
        /// </summary>
        [Column("PATIENT_ID", TypeName = "VARCHAR(60)"), Required, Index("INDEX_HIS_EXAM", 1, IsUnique = true)]
        public string PatientId { get; set; }

        /// <summary>
        /// 病人本次住院标识
        /// </summary>
        [Column("VISIT_ID", TypeName = "VARCHAR(60)"), Required, Index("INDEX_HIS_EXAM", 2, IsUnique = true)]
        public string VisitId { get; set; }

        /// <summary>
        /// 检查单号
        /// </summary>
        [Column("EXAM_NO", TypeName = "VARCHAR(12)"), Required, Index("INDEX_HIS_EXAM", 3, IsUnique = true)]
        public string ExamNo { get; set; }

        /// <summary>
        /// 病人所在科室
        /// </summary>
        [Column("DEPT_STAYED", TypeName = "VARCHAR(20)")]
        public string DeptStayed { get; set; }

        /// <summary>
        /// 病人所在床号
        /// </summary>
        [Column("BED_NO", TypeName = "INT")]
        public int? BedNo { get; set; }

        /// <summary>
        /// 临床诊断
        /// </summary>
        [Column("CLIN_DIAG", TypeName = "VARCHAR(80)")]
        public string ClinDiag { get; set; }

        /// <summary>
        /// 检查类别
        /// </summary>
        [Column("EXAM_CLASS", TypeName = "VARCHAR(20)"), Required]
        public string ExamClass { get; set; }

        /// <summary>
        /// 检查子类
        /// </summary>
        [Column("EXAM_SUB_CLASS", TypeName = "VARCHAR(30)"), Required]
        public string ExamSubClass { get; set; }

        /// <summary>
        /// 项目代码
        /// </summary>
        [Column("EXAM_ITEM_CODE", TypeName = "VARCHAR(20)"), Required]
        public string ExamItemCode { get; set; }

        /// <summary>
        /// 项目名称
        /// </summary>
        [Column("EXAM_ITEM_NAME", TypeName = "VARCHAR(100)"), Required]
        public string ExamItemName { get; set; }

        /// <summary>
        /// 申请日期及时间
        /// </summary>
        [Column("REQ_DATE_TIME", TypeName = "DATETIME")]
        public DateTime ReqDateTime { get; set; }

        /// <summary>
        /// 申请医生
        /// </summary>
        [Column("REQ_DOCTOR", TypeName = "VARCHAR(10)")]
        public string ReqDoctor { get; set; }

        /// <summary>
        /// 检查日期及时间
        /// </summary>
        [Column("EXAM_DATE_TIME", TypeName = "DATETIME")]
        public DateTime? ExamDateTime { get; set; }

        /// <summary>
        /// 报告日期及时间
        /// </summary>
        [Column("REPORT_DATE_TIME", TypeName = "DATETIME")]
        public DateTime? ReportDateTime { get; set; }

        /// <summary>
        /// 检查状态
        /// </summary>
        [Column("EXAM_STATUS", TypeName = "VARCHAR(1)"), Required]
        public string ExamStatus { get; set; }
    }
}
